import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);


export default new Router({
    routes: [
        // {
        //     path: '/',
        //     redirect: '/taximetermgmt'
        // },
        {
            path: '/',
            redirect: '/first'
        },
        // {
        //     path: '/',
        //     redirect: '/paramfilemgmt'
        // },
        // {
        //     path: '/',
        //     redirect: '/check'
        // },
        // {
        //     path: '/',
        //     redirect: '/search'
        // },
        // {
        //     path: '/',
        //     redirect: '/user'
        // },
        // {
        //     path: '/',
        //     redirect: '/role'
        // },

        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '首页' },
            children:[
                {
                    path: '/first',
                    component: resolve => require(['../components/page/First.vue'], resolve),
                    meta: { title: '首页' }
                },
                {
                    path: '/taximetermgmt',
                    component: resolve => require(['../components/page/TaximeterMgmt.vue'], resolve),
                    meta: { title: ' 车辆管理' }
                },
                {
                    path: '/paramfilemgmt',
                    component: resolve => require(['../components/page/ParamfileMgmt.vue'], resolve),
                    meta: { title: '计价器参数文件管理' }
                },
                {
                    path: '/check',
                    component: resolve => require(['../components/page/Check.vue'], resolve),
                    meta: { title: '审核' }
                },
                {
                    path: '/search',
                    component: resolve => require(['../components/page/Search.vue'], resolve),
                    meta: { title: '查询计价器内部版本号' }
                },
                {
                    path: '/searchfile',
                    component: resolve => require(['../components/page/SearchFile.vue'], resolve),
                    meta: { title: '查询升级文件' }
                },
                {
                    path: '/user',
                    component: resolve => require(['../components/page/User.vue'], resolve),
                    meta: { title: '用户管理' }
                },
                {
                    path: '/role',
                    component: resolve => require(['../components/page/Role.vue'], resolve),
                    meta: { title: '权限管理' }
                },
                {
                    path: '/company',
                    component: resolve => require(['../components/page/Company.vue'], resolve),
                    meta: { title: '出租车公司管理' }
                },
                {
                    path: '/fact',
                    component: resolve => require(['../components/page/Fact.vue'], resolve),
                    meta: { title: '计价器厂商管理' }
                },
                {
                    path: '/pricetype',
                    component: resolve => require(['../components/page/PriceType.vue'], resolve),
                    meta: { title: '出租车价格类型管理' }
                },
                {
                    path: '/taximetertype',
                    component: resolve => require(['../components/page/TaximeterType.vue'], resolve),
                    meta: { title: '计价器型号管理' }
                },
                {
                    path: '/404',
                    component: resolve => require(['../components/page/404.vue'], resolve),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: resolve => require(['../components/page/403.vue'], resolve),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})


// {
//     path: '/icon',
//     component: resolve => require(['../components/page/Icon.vue'], resolve),
//     meta: { title: '自定义图标' }
// },
// {
//     path: '/table',
//     component: resolve => require(['../components/page/BaseTable.vue'], resolve),
//     meta: { title: '基础表格' }
// },
// {
//     path: '/tabs',
//     component: resolve => require(['../components/page/Tabs.vue'], resolve),
//     meta: { title: 'tab选项卡' }
// },
// {
//     path: '/form',
//     component: resolve => require(['../components/page/BaseForm.vue'], resolve),
//     meta: { title: '基本表单' }
// },
// {
//     // 富文本编辑器组件
//     path: '/editor',
//     component: resolve => require(['../components/page/VueEditor.vue'], resolve),
//     meta: { title: '富文本编辑器' }
// },
// {
//     // markdown组件
//     path: '/markdown',
//     component: resolve => require(['../components/page/Markdown.vue'], resolve),
//     meta: { title: 'markdown编辑器' }
// },
// {
//     // 图片上传组件
//     path: '/upload',
//     component: resolve => require(['../components/page/Upload.vue'], resolve),
//     meta: { title: '文件上传' }
// },
// {
//     // vue-schart组件
//     path: '/charts',
//     component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
//     meta: { title: 'schart图表' }
// },
// {
//     // 拖拽列表组件
//     path: '/drag',
//     component: resolve => require(['../components/page/DragList.vue'], resolve),
//     meta: { title: '拖拽列表' }
// },
// {
//     // 拖拽Dialog组件
//     path: '/dialog',
//     component: resolve => require(['../components/page/DragDialog.vue'], resolve),
//     meta: { title: '拖拽弹框' }
// },
// {
//     // 国际化组件
//     path: '/i18n',
//     component: resolve => require(['../components/page/I18n.vue'], resolve),
//     meta: { title: '国际化' }
// },
// {
//     // 权限页面
//     path: '/permission',
//     component: resolve => require(['../components/page/Permission.vue'], resolve),
//     meta: { title: '权限测试', permission: true }
// },